#include "2DTexture.h"
#include "GraphicsManager.h"

C2DTexture::C2DTexture()
: m_Texture(NULL)
{
}
void C2DTexture::Activate(size_t StageId)
{
   	CORE->GetGraphicsManager()->GetDevice()->SetTexture(StageId,m_Texture);
}

bool C2DTexture::LoadFile()
{
	return !FAILED(D3DXCreateTextureFromFile(CORE->GetGraphicsManager()->GetDevice(), m_FileName.c_str(), &m_Texture));
}

void C2DTexture::Unload()
{
	CHECKED_RELEASE(m_Texture);
}
